<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>过渡效果</title>
    <script type="text/javascript" src="../js/vue.js"></script>
    <style type="text/css">
        .fade-enter-active, .fade-leave-active {
            transition: opacity .5s
        }
        .fade-enter, .fade-leave-to{
            opacity: 0
        }
    </style>
</head>
<body>
    <div id="demo">
        <button v-on:click="show=!show">
            Toggle
        </button>
        <transition name="fade">
            <p v-if="show">hello</p>
        </transition>
    </div>

    <script>
        new Vue({
            el:'#demo',
            data:{
                show:true
            }
        })
    </script>
</body>
</html>